<CrateHeader @crate={{this.model}} />

<div local-class="results-meta">
  <span local-class="page-description" data-test-page-description>
    All <strong>{{ this.model.versions.length }}</strong>
    versions of <strong>{{ this.model.name }}</strong> since
    {{date-format this.model.created_at 'PPP'}}
  </span>

  <div data-test-search-sort>
    <span local-class="sort-by-label">Sort by </span>
    <SortDropdown @current={{this.currentSortBy}} as |sd|>
      <sd.Option @query={{hash sort="date"}} data-test-date-sort>Date</sd.Option>
      <sd.Option @query={{hash sort="semver"}} data-test-semver-sort>SemVer</sd.Option>
    </SortDropdown>
  </div>
</div>

<ul local-class="list">
  {{#each this.sortedVersions as |version|}}
    <li>
      <VersionList::Row @version={{version}} local-class="row" data-test-version={{version.num}} />
    </li>
  {{/each}}
</ul>
